using System;
using System.IO;
using DailyPoetryX.Services.Implementations;

namespace DailyPoetryX.UnitTest.Helpers {
    /// <summary>
    /// 收藏存储帮助类
    /// </summary>
    public class FavoriteStorageHelper {
        /// <summary>
        /// 删除数据库文件。
        /// </summary>
        public static void RemoveDatabaseFile() {
            GC.Collect();
            GC.WaitForPendingFinalizers();
            File.Delete(Path.Combine(
                Environment.GetFolderPath(Environment.SpecialFolder
                    .LocalApplicationData), FavoriteStorage.DbName));
        }
    }
}